/**
 * 
 */
package com.swg.cocobox.message.event;

import java.nio.channels.SocketChannel;

import com.swg.cocobox.EventSupport;

/**
 * @author satriaprayoga
 *
 */
public class MessageEventSupport extends EventSupport<MessageEvent, MessageEventListener>{
	private static final long serialVersionUID = 9132051681659256836L;

	public MessageEventSupport(Object source) {
		super(source);
	}

	@Override
	public MessageEvent fireEvent(SocketChannel channel) {
		return new MessageEvent(getSource(), channel);
	}
	
	public MessageEvent fireEvent(SocketChannel channel,int type){
		return new MessageEvent(getSource(), channel, type);
	}
	
	public MessageEvent fireEvent(SocketChannel channel,int type,Object attachment){
		MessageEvent event=fireEvent(channel, type);
		event.setAttachment(attachment);
		return event;
	}

}
